]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Grab the key focus when entering from the keybinding
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 15 Aug 2012 17:42:31 +0000 (13:42 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Mon, 20 Aug 2012 01:15:48 +0000 (21:15 -0400)
js/ui/messageTray.js

index 5f7506978e2d6aac83343bd1726f36d53476b096..8d14d1f4971747bcf35909bbf81263678fd48fd1 100644 (file)
@@ -1423,7 +1423,7 @@ const MessageTray = new Lang.Class({
         global.display.add_keybinding('toggle-message-tray',
                                       new Gio.Settings({ schema: SHELL_KEYBINDINGS_SCHEMA }),
                                       Meta.KeyBindingFlags.NONE,
-                                      Lang.bind(this, this.toggle));
+                                      Lang.bind(this, this.toggleAndNavigate));
 
         this._summaryItems = [];
         this._chatSummaryItemsCount = 0;
@@ -1575,6 +1575,13 @@ const MessageTray = new Lang.Class({
         this._updateState();
     },
 
+    toggleAndNavigate: function() {
+        // Grab the key focus so that GrabHelper knows
+        // that we have the key grab.
+        this._summary.grab_key_focus();
+        this.toggle();
+    },
+
     hide: function() {
         this._traySummoned = false;
         this.actor.set_hover(false);